package lang.SQLQueryParserRoutine;

import lang.SQLQueryToken;

import java.util.Set;
import java.util.HashSet;
import java.util.ArrayList;
import java.util.HashMap;

/**
 * User: [J0k3r]
 * Date: 31.05.2008
 * Time: 22:18:12
 */
public class SQLQueryParserState4Insert extends SQLQueryParserState {
    private String destTable = null;
    private ArrayList<String[]> columns2Insert = new ArrayList<String[]>();
    private ArrayList <SQLQueryToken> whereTokens = new ArrayList<SQLQueryToken>();
    private int curFillIndex = 0;

    public SQLQueryParserState4Insert(SQLQueryParserAutomateState automatState) {
        this.automatState = automatState;
    }

    public ArrayList <String[]> getColumns2Insert() {
        return columns2Insert;
    }

    public void addColumn2Insert(String colName) {
        this.columns2Insert.add(new String[]{colName, null});
    }

    public void addValue2Insert(String value) {
        this.columns2Insert.get(curFillIndex++)[1] = value;
    }

    public String getDestTable() {
        return destTable;
    }

    public void setDestTable(String destTable) {
        this.destTable = destTable;
    }

    public ArrayList<SQLQueryToken> getWhereTokens() {
        return whereTokens;
    }
}
